package com.zz.spring6.iocxml.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUserDao {
    public static void main(String[] args) {
        ApplicationContext context = new
                ClassPathXmlApplicationContext("BEAN.XML");
        // 根据类型 获取接口对应的bean
        UserDao userDao = context.getBean(UserDao.class);
        //  接口等于实现类的对象
        System.out.println(userDao);
        userDao.rum();
    }
}
